﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RSD.Scripting.Expressions
{
    using Robot;

    public class MoveByCoordinateExpression : BaseExpression
    {
        public Position Position
        {
            get;
            private set;
        }

        public bool IsValidCoordinate
        {
            get;
            private set;
        }

        public MoveByCoordinateExpression(string x, string y, string z, string pitch, string roll)
        {
            Position = new Position();

            IsValidCoordinate = int.TryParse(x, out Position.Joint[0]);
            IsValidCoordinate = int.TryParse(y, out Position.Joint[1]);
            IsValidCoordinate = int.TryParse(z, out Position.Joint[2]);
            IsValidCoordinate = int.TryParse(pitch, out Position.Joint[3]);
            IsValidCoordinate = int.TryParse(roll, out Position.Joint[4]);            
        }
    }
}
